 <?
if (!defined('baseinfo')) {
    exitdata();
}   
?>

<div class="subB clTxt1 fs05 clBg4">
    <div class="wrpSubB mainSB">
        <div class="ttlB cutTxt">Cart Manager</div>
    </div>
</div>

<div class="wrprCart">
    <div class="wrpTgHdGen clBd2 bdBtm clTxt2 fs05">
        <span class="tgHdGen tgCl clBd2 bdR clSp2" onclick="changetabcartmanage('wrprOrdHtr')">Order List</span>
<!--        <span class="tgHdGen tgCl clBd2 bdR" onclick="changetabcartmanage('wrprStckCrtMn')">Inventory</span>
        <span class="tgHdGen tgCl clBd2 bdR" onclick="changetabcartmanage('wrprCtmCrtMn')">Customer</span>-->
        <span class="tgHdGen tgCl clBd2" onclick="changetabcartmanage('wrprSttCrtMn')">Setting</span>
    </div>
    <div class="wrpCart">
        <!-- Stat -->
        <div class="wrpStatCartManage"  >
            <div class="wrpOvaStat clearfix">
                <div class="ovaStat clBd2 bdFull">
                    <div class="hdOvaStat clBd2 bdBtm clBg1">
                        <span class="clTxtPOSB fs03">Benefit</span>
                    </div>
                    <div class="bdOvaStat clTxtPOSB">
                        <span class="fs11"><?=$data['stat']['benefit']?></span>
                        <span class="fs07">Baht</span>
                    </div>
                </div>
                <div class="ovaStat clBd2 bdFull">
                    <div class="hdOvaStat clBd2 bdBtm clBg1">
                        <span class="clTxtPOSB fs03">Pay with Points</span>
                    </div>
                    <div class="bdOvaStat clTxtPOSB">
                        <span class="fs11"><?=$data['stat']['paypoint']?></span>
                        <span class="fs07">Points</span>
                    </div>
                </div>
                <div class="ovaStat clBd2 bdFull">
                    <div class="hdOvaStat clBd2 bdBtm clBg1">
                        <span class="clTxtPOSB fs03">Total Order</span>
                    </div>
                    <div class="bdOvaStat clTxtPOSB">
                        <span class="fs11"><?=$data['stat']['countorder']?></span>
                        <span class="fs07">Orders</span>
                    </div>
                </div>
                <div class="ovaStat clBd2 bdFull">
                    <div class="hdOvaStat clBd2 bdBtm clBg1">
                        <span class="clTxtPOSB fs03">Total Sold Items</span>
                    </div>
                    <div class="bdOvaStat clTxtPOSB">
                        <span class="fs11"><?=$data['stat']['solditem']?></span>
                        <span class="fs07">Items</span>
                    </div>
                </div>
                <div class="ovaStat clBd2 bdFull">
                    <div class="hdOvaStat clBd2 bdBtm clBg1">
                        <span class="clTxtPOSB fs03">Total Use Coupon</span>
                    </div>
                    <div class="bdOvaStat clTxtPOSB">
                        <span class="fs11"><?=$data['stat']['couponitem']?></span>
                        <span class="fs07">Times</span>
                    </div>
                </div>
                <div class="ovaStat clBd2 bdFull">
                    <div class="hdOvaStat clBd2 bdBtm clBg1">
                        <span class="clTxtPOSB fs03">Total Coupon Value</span>
                    </div>
                    <div class="bdOvaStat clTxtPOSB">
                        <span class="fs11"><?=$data['stat']['couponvalue']?></span>
                        <span class="fs07">Baht</span>
                    </div>
                </div>
            </div>
        </div>
        <!-- Order List -->
        <div class="wrprOrdHtr carttab" >
            <div class="wrpOrdHtr">
                <div class="wrprSrchOrdHtr">
                    <div class="wrpSrchOrdHtr clearfix">
                        <div class="wrpSrchBox">
                            <input type="text" placeholder="Search" class="srchBox clBg4 fs01 clTxt3">
                            <div class="btnIco srchGen">
                                <span class="ico icoSrchGen"></span>
                            </div>
                        </div>
                    </div>
                    <div class="wrpFiltOrdHtr">                                
                        <button class="btntFiltOrdHtr clTxtW clBgBt1 fs02 btnFiltOrdHtrAct" id="shopidset-0" onclick="getshopmyorderlist(1,0)">All</button>
                        <button class="btntFiltOrdHtr clTxtW clBgBt1 fs02" id="shopidset-1" onclick="getshopmyorderlist(1,1)">Reserve</button>
                        <button class="btntFiltOrdHtr clTxtW clBgBt1 fs02" id="shopidset-2"  onclick="getshopmyorderlist(1,2)">Paid</button>
                        <button class="btntFiltOrdHtr clTxtW clBgBt1 fs02"  id="shopidset-3" onclick="getshopmyorderlist(1,3)">Shipped</button>
                        <button class="btntFiltOrdHtr clTxtW clBgBt1 fs02" id="shopidset-4" onclick="getshopmyorderlist(1,4)">Canceled</button>
                    </div>
                </div>
                <div class="wrprTbCart clBd2">
                    <div class="tbCart clTxt2">
                        <div class="wrpHdTbCart clBg2">
                            <div class="hdTbCart fs04 boldGen clearfix">
                                <span class="ct o1">Date</span>
                                <span class="ct o2">Customer</span>
                                <span class="ct o3">Order ID</span>
                                <span class="ct o4">Amount (Baht)</span>
                                <span class="ct o5">Status</span>
                            </div>
                        </div>
                        <div class="wrpItmLstCart clBd2 bdBtm">
                          
                            
                        </div>
                        <div class="pageat2cart"></div>
                    </div>
                </div>
            </div>
        </div>
        <!-- Inventory -->
        <div class="wrprStckCrtMn fs04 carttab" style="display: none;">
            <div class="stckOffTxt">
                <span>You don't enabled inventory system in inventory setting.</span>
            </div>
            <div class="wrprSrchOrdHtr">
                <div class="wrpSrchOrdHtr clearfix">
                    <div class="wrpSrchBox">
                        <input type="text" placeholder="Search" class="srchBox clBg4 fs01 clTxt3">
                        <div class="btnIco srchGen">
                            <span class="ico icoSrchGen"></span>
                        </div>
                    </div>
                </div>
                <div class="wrpFiltOrdHtr">
                    <button class="btntFiltStck clTxtW clBgBt1 fs02 btnFiltStckAct">A-Z</button>
                    <button class="btntFiltStck clTxtW clBgBt1 fs02">0-100</button>
                    <button class="btntFiltStck clTxtW clBgBt1 fs02">100-0</button>
                </div>
            </div>
            <div class="hdStckCrtMn clearfix clBg2">
                <div class="stcMn stcMn1">
                    <span class="boldGen">Product</span>
                </div>
                <div class="stcMn stcMn2">
                    <span class="boldGen">Current Amount</span>
                </div>
                <div class="stcMn stcMn3">
                    <span class="boldGen">Add Stock</span>
                </div>
                <div class="stcMn stcMn4">
                    <span class="boldGen">Remove Stock</span>
                </div>
                <div class="stcMn stcMn5">
                    <span class="bobtnSckMnHtr boldGen">Transaction</span>
                </div>
            </div>
            <div class="bdStckCrtMn">
                <div class="lstStckCrtMn clearfix clBd2">
                    <div class="stcMn stcMn1 clearfix">
                        <div class="pdImgCart">
                            <img alt="img" src="img/testtn1.jpg">
                        </div>
                        <div class="pdNameCart">
                            <a class="boldGen" href="">Product Name</a>
                            <span>Main Attribute : Sub Attribute</span>
                        </div>
                    </div>
                    <div class="stcMn stcMn2 clearfix">
                        <span>100</span>
                    </div>
                    <div class="stcMn stcMn3 clearfix">
                        <input type="text" class="clBg5 clBd2 fs03 clTxt2">
                        <button class="clTxtW clBgBt1 fs04">Update</button>
                    </div>
                    <div class="stcMn stcMn4 clearfix">
                        <input type="text" class="clBg5 clBd2 fs03 clTxt2">
                        <button class="clTxtW clBgBt1 fs04">Update</button>
                    </div>
                    <div class="stcMn stcMn5 clearfix">
                        <button class="btnSckMnHtr clTxtW clBgBt1 fs04">View</button>
                    </div>
                </div>
                <div class="lstStckCrtMn clearfix clBd2">
                    <div class="stcMn stcMn1 clearfix">
                        <div class="pdImgCart">
                            <img alt="img" src="img/testtn1.jpg">
                        </div>
                        <div class="pdNameCart">
                            <a class="boldGen" href="">Product Name</a>
                            <span>Main Attribute : Sub Attribute</span>
                        </div>
                    </div>
                    <div class="stcMn stcMn2 clearfix">
                        <span>100</span>
                    </div>
                    <div class="stcMn stcMn3 clearfix">
                        <input type="text" class="clBg5 clBd2 fs03 clTxt2">
                        <button class="clTxtW clBgBt1 fs04">Update</button>
                    </div>
                    <div class="stcMn stcMn4 clearfix">
                        <input type="text" class="clBg5 clBd2 fs03 clTxt2">
                        <button class="clTxtW clBgBt1 fs04">Update</button>
                    </div>
                    <div class="stcMn stcMn5 clearfix">
                        <button class="btnSckMnHtr clTxtW clBgBt1 fs04">View</button>
                    </div>
                </div>
                <div class="lstStckCrtMn clearfix clBd2">
                    <div class="stcMn stcMn1 clearfix">
                        <div class="pdImgCart">
                            <img alt="img" src="img/testtn1.jpg">
                        </div>
                        <div class="pdNameCart">
                            <a class="boldGen" href="">Product Name</a>
                            <span>Main Attribute : Sub Attribute</span>
                        </div>
                    </div>
                    <div class="stcMn stcMn2 clearfix">
                        <span>100</span>
                    </div>
                    <div class="stcMn stcMn3 clearfix">
                        <input type="text" class="clBg5 clBd2 fs03 clTxt2">
                        <button class="clTxtW clBgBt1 fs04">Update</button>
                    </div>
                    <div class="stcMn stcMn4 clearfix">
                        <input type="text" class="clBg5 clBd2 fs03 clTxt2">
                        <button class="clTxtW clBgBt1 fs04">Update</button>
                    </div>
                    <div class="stcMn stcMn5 clearfix">
                        <button class="btnSckMnHtr clTxtW clBgBt1 fs04">View</button>
                    </div>
                </div>
            </div>
        </div>
        <!-- customer -->
        <div class="wrprCtmCrtMn fs04 carttab" style="display: none;">
            <div class="wrprSrchOrdHtr">
                <div class="wrpSrchOrdHtr clearfix">
                    <div class="wrpSrchBox">
                        <input type="text" placeholder="Search" class="srchBox clBg4 fs01 clTxt3">
                        <div class="btnIco srchGen">
                            <span class="ico icoSrchGen"></span>
                        </div>
                    </div>
                </div>
                <div class="wrpFiltOrdHtr">
                    <button class="btntFiltCtmMn clTxtW clBgBt1 fs02 btntFiltCtmMnAct">A-Z</button>
                    <button class="btntFiltCtmMn clTxtW clBgBt1 fs02">Most Ordered</button>
                    <button class="btntFiltCtmMn clTxtW clBgBt1 fs02">Highest Paid</button>
                </div>
            </div>
            <div class="hdCtmCrtMn clearfix clBg2">
                <div class="ctmMn ctmMn0">
                    <span class="boldGen">No.</span>
                </div>
                <div class="ctmMn ctmMn1">
                    <span class="boldGen">Customer Name</span>
                </div>
                <div class="ctmMn ctmMn2">
                    <span class="boldGen">No. of Orders</span>
                </div>
                <div class="ctmMn ctmMn3">
                    <span class="boldGen">Total Payment</span>
                </div>
                <div class="ctmMn ctmMn4">
                    <span class="boldGen">Lastest Order</span>
                </div>
            </div>
            <div class="bdCtmCrtMn">
                <div class="lstCtmCrtMn clearfix clBd2">
                    <div class="ctmMn ctmMn0">
                        <span>1.</span>
                    </div>
                    <div class="ctmMn ctmMn1">
                        <div class="spnShpOrdCtmView clearfix">
                            <a href="">
                                <img width="32" height="32" alt="img" src="img/dfthmbuser.jpg" class="shpImgUser">
                                <span class="shpNameUser cutTxt clTxt2 fs04">นาย ก.</span>
                            </a>
                        </div>
                    </div>
                    <div class="ctmMn ctmMn2">
                        <a class="boldGen btnCtmMn">100</a>
                    </div>
                    <div class="ctmMn ctmMn3">
                        <span>10,000</span>
                    </div>
                    <div class="ctmMn ctmMn4">
                        <span>10/10/2014</span>
                    </div>
                </div>
                <div class="lstCtmCrtMn clearfix clBd2">
                    <div class="ctmMn ctmMn0">
                        <span>2.</span>
                    </div>
                    <div class="ctmMn ctmMn1">
                        <div class="spnShpOrdCtmView clearfix">
                            <span>Guest (Nopp)</span>
                        </div>
                    </div>
                    <div class="ctmMn ctmMn2">
                        <a class="boldGen btnCtmMn">100</a>
                    </div>
                    <div class="ctmMn ctmMn3">
                        <span>10,000</span>
                    </div>
                    <div class="ctmMn ctmMn4">
                        <span>10/10/2014</span>
                    </div>
                </div>
            </div>
        </div>



        
            
        <!-- setting -->
        <div class="wrprSttCrtMn carttab" style="display: none;">
            <div class="wrpSttCrtMn fs04">
                <div class="sttCrtMn wrpCrcCrtMn">
                    <div class="hdSttCrtMn">
                        <span class="boldGen">Shop Setting</span>
                    </div>
                    <div class="bdSttCrtMn">
                        <div class="wrpStckCrtMn">
                            <div class="hdStckCrtMn">
                                <span>1. Shop Name</span>
                            </div>
                            <div class="inpStckCrtMn">
                                <input type="text" name="shopname" class="inpAddCtnt w120 clBg5 clBd2 fs03 clTxt2">
                            </div>
                        </div>
                        <div class="wrpStckCrtMn">
                            <div class="hdStckCrtMn">
                                <span>2. Prefix Order ID (4 characters)</span>
                            </div>
                            <div class="inpStckCrtMn">
                                <input type="text" name="orderprefix" class="inpAddCtnt w120 clBg5 clBd2 fs03 clTxt2">
                            </div>
                        </div>
                        <div class="wrpStckCrtMn">
                            <div class="hdStckCrtMn">
                                <span>3. Currency</span>
                            </div>
                            <div class="bdSttCrtMn">
                                <div class="reDesign reDsCrc">
                                    <select name="curid">
                                        <?if(count($data['currency'])){
                                            foreach($data['currency'] as $keycure=> $valuecurrency)
                                            {
                                        ?>
                                        <option value="<?=$keycure?>"><?=$valuecurrency?></option>
                                        <?
                                            }
                                        
                                        }?>
                                    </select>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="sttCrtMn wrpStckCrtMn">
                    <div class="hdSttCrtMn">
                        <span class="boldGen">Inventory Setting</span>
                    </div>
                    <div class="bdSttCrtMn">
                        <div class="wrpStckCrtMn">
                            <div class="hdStckCrtMn">
                                <span>Enabled Inventory System</span>
                            </div>
                            <div class="wrpRdoStckCrtMn">
                                <div class="rdoStckCrtMn">
                                    <input type="radio" value="1" checked="" name="invent">
                                    <label for="">Yes</label>
                                </div>
                                <div class="rdoStckCrtMn">
                                    <input type="radio" value="0" name="invent">
                                    <label for="">No</label>
                                </div>
                            </div>
                        </div>
<!--                         <div class="wrpStckCrtMn">
                            <div class="hdStckCrtMn">
                                <span>2. Reduce Inventory When</span>
                            </div>
                            <div class="wrpRdoStckCrtMn">
                                <div class="rdoStckCrtMn">
                                    <input type="radio" name="stckMn" checked>
                                    <label for="">Reserve</label>
                                </div>
                                <div class="rdoStckCrtMn">
                                    <input type="radio" name="stckMn">
                                    <label for="">Paid</label>
                                </div>
                                <div class="rdoStckCrtMn">
                                    <input type="radio" name="stckMn">
                                    <label for="">Shipped</label>
                                </div>
                            </div>
                        </div> -->
                    </div>
                </div>
                <div class="sttCrtMn wrpHtSCrtMn">
                    <div class="hdSttCrtMn">
                        <span class="boldGen">Transport Setting</span>
                    </div>
                    <div class="bdSttCrtMn">
                        <div class="wrpInHtPCrtMn">
                            <div class="htPCrtMn">
                                <div class="bdHtpCrtMn">
                                    <div class="btnAddHtPCrtMn">
                                        <button class="clBgBt1 clTxtW fs04" type="button" onclick="addtransport()">+ Add Transport</button>
                                    </div>
                                    <div id="addtransporterdiv"></div>
                                                                        
                                    </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="sttCrtMn wrpHtPCrtMn">
                    <div class="hdSttCrtMn">
                        <span class="boldGen">Payment Setting</span>
                    </div>
                    <div class="bdSttCrtMn">
                        <div class="wrpInHtPCrtMn">
                            <div class="htPCrtMn">
                                <div class="rdoHtPCrtMn">
                                    <input type="checkbox" id="htp1" value="1" name="transfer">
                                    <label for="htp1">Transfer</label>
                                </div>
                                <div class="bdHtpCrtMn">
                                    <div class="btnAddHtPCrtMn">
                                        <button class="clBgBt1 clTxtW fs04" type="button" onclick="addpaymentsetting()" >+ Add Account</button>
                                    </div>
                                    <div id="addpaymentdiv"></div>
                     
                                </div>
                            </div>
                            <div class="htPCrtMn">
                                <div class="rdoHtPCrtMn">
                                    <input type="checkbox" id="htp2" value="1" name="paypal[]">
                                    <label for="htp2">Paypal</label>
                                </div>
                                <div class="bdHtpCrtMn">
                                    <div class="lstPayPalCrtMn">
                                        <span>Paypal Email</span>
                                        <input type="text" name="paypalemail[]" class="inpAddCtnt w120 clBg5 clBd2 fs03 clTxt2">
                                    </div>
                                </div>
                            </div>
                            <div class="htPCrtMn">
                                <div class="rdoHtPCrtMn">
                                    <input type="checkbox" id="htp4" value="1" name="paypoint[]">
                                    <label for="htp4">Pay with Points</label>

                                </div>
                                <div class="bdHtpCrtMn">
                                    <div class="lstPayPalCrtMn">
                                        <span>1 Baht =</span>
                                        <input type="text" name="point" class="inpAddCtnt w120 clBg5 clBd2 fs03 clTxt2">
                                        <span>Point(s)</span>
                                    </div>
                                </div>
                            </div>
                            <div class="htPCrtMn">
                                <div class="rdoHtPCrtMn">
                                    <input type="checkbox" id="htp5" value="1" name="paycredit">
                                    <label for="htp5">Pay with Credit</label>
                                </div>
                            </div>
                            <div class="htPCrtMn">
                                <div class="rdoHtPCrtMn">
                                    <input type="checkbox" id="htp6" value="1" name="etc">
                                    <label for="htp6">ETC</label>
                                </div>
                                <div class="bdHtpCrtMn">
                                    <div class="btnAddHtPCrtMn">
                                        <button class="clBgBt1 clTxtW fs04" onclick="addpaymentetc()">+ Add ETC Payment</button>
                                    </div>
                                    
                                    <div id="addpaymentetcdiv"></div>
                                                                        
                                    </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="wrpBtnSttCrtMn">
                <button class="clBgSp1 clTxtW fs04" onclick="savecartmanage()">SAVE</button>
            </div>
        </div>
        
        
        
        
    </div>
</div>
